package com.tjbank.cssys.mybatis.mapper;

import com.tjbank.cssys.mybatis.entity.IamMenu;
import com.tjbank.cssys.mybatis.entity.IamMenuKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamMenuSqlBuilder;

import java.util.List;

/**
 * IamMenuMapper
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamMenuMapper {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamMenu> selectBySqlBuilderWithBLOBs(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamMenu> selectBySqlBuilder(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamMenuKey
     * @return
     * @throws Exception
     */
    public IamMenu selectByPrimaryKey(IamMenuKey iamMenuKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamMenu
     * @return
     * @throws Exception
     */
    public int insert(IamMenu iamMenu) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamMenu
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamMenu> listIamMenu) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 
     * @param iamMenuKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamMenuKey iamMenuKey) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 
     * @param iamMenuKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamMenuKey iamMenuKey) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamMenuSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamMenuSqlBuilder iamMenuSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamMenuKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamMenuKey iamMenuKey) throws RuntimeException;

}